package com.elephantgreen.common;

import java.util.Vector;

/**
 * This object is used to store all client related transaction details. Such as 
 * the credit balance for each client and unrealised cheque details.
 * 
 * @author Shaminda Samaratunge
 *
 */
public class ClientTransaction extends ElephantgreenCommon{

	
	private String clientId;
	private String creditBalance;
    private Vector<ChequeDetails> unrealisedCheques;
	
	/**
	 * Generic constructor is private.
	 */
	@SuppressWarnings("unused")
	
	private ClientTransaction() {
		super();
	}
	
	/**
	 * Create new ClientTransactios object.
	 * 
	 * @param clientId
	 * @param creditBalance
	 * @param cheques
	 * @param unrealisedCheques
	 */
	public ClientTransaction(String clientId, String creditBalance,
			Vector<ChequeDetails> unrealisedCheques) {
		super();
		this.clientId = clientId;
		this.creditBalance = creditBalance;
		this.unrealisedCheques = unrealisedCheques;
	}
	
	public void addCheque(ChequeDetails cd){
		this.unrealisedCheques.add(cd);
	}
    
	@Override
	public String toString() {
		return "ClientTransaction [clientId=" + clientId + ", creditBalance="
				+ creditBalance + ", unrealisedCheques=" + unrealisedCheques
				+ "]";
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getCreditBalance() {
		return creditBalance;
	}

	public void setCreditBalance(String creditBalance) {
		this.creditBalance = creditBalance;
	}

	public void setUnrealisedCheques(Vector<ChequeDetails> unrealisedCheques) {
		this.unrealisedCheques = unrealisedCheques;
	}
	public Vector<ChequeDetails> getUnrealisedCheques() {
		return unrealisedCheques;
	}

}
